/* GUI CONVERTED from rcsoiq.i (converter v1.76) Fri May  3 13:22:19 2002 */
/* rcsoiq.i - Release Management Customer Schedules                           */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* $Revision: 1.20 $                                                      */
/*                                                                            */
/* REVISION: 7.3    LAST MODIFIED: 09/30/92          BY: WUG *G462*           */
/* REVISION: 7.3    LAST MODIFIED: 05/24/93          BY: WUG *GB29*           */
/* REVISION: 7.3    LAST MODIFIED: 06/11/93          BY: WUG *GB74*           */
/* REVISION: 7.4    LAST MODIFIED: 09/28/93          BY: WUG *H140*           */
/* REVISION: 7.4    LAST MODIFIED: 09/28/93          BY: WUG *H141*           */
/* REVISION: 7.4    LAST MODIFIED: 12/23/93          BY: WUG *GI32*           */
/* REVISION: 7.4    LAST MODIFIED: 08/19/94          BY: dpm *GL37*           */
/* REVISION: 7.4    LAST MODIFIED: 10/31/94          BY: rxm *GN17*           */
/* REVISION: 7.4    LAST MODIFIED: 11/07/94          BY: ljm *GO33*           */
/* REVISION: 7.4    LAST MODIFIED: 11/30/94          BY: mmp *H609*           */
/* REVISION: 7.5    LAST MODIFIED: 04/11/95          BY: dpm *J044*           */
/* REVISION: 8.5    LAST MODIFIED: 08/28/95          BY: kxn *J077*           */
/* REVISION: 7.4    LAST MODIFIED: 06/16/95          BY: str *G0N9*           */
/* REVISION: 7.4    LAST MODIFIED: 08/15/95          BY: bcm *G0TB*           */
/* REVISION: 7.3    LAST MODIFIED: 10/07/95          BY: vrn *G0YL*           */
/* REVISION: 8.6    LAST MODIFIED: 09/20/96          BY: TSI *K005*           */
/* REVISION: 8.6    LAST MODIFIED: 10/15/96          BY: *G2GJ* Ajit Deodhar  */
/* REVISION: 8.6    LAST MODIFIED: 12/02/96          BY: *K02S* Chris Theisen */
/* REVISION: 8.6    LAST MODIFIED: 12/02/96        BY: *K09F* Verghese Kurien */
/* REVISION: 8.6    LAST MODIFIED: 05/01/97        BY: *K0CT* Kieu Nguyen     */
/* REVISION: 8.6    LAST MODIFIED: 06/03/97        BY: *K0DQ* Taek-Soo Chang  */
/* REVISION: 8.6    LAST MODIFIED: 10/15/97        BY: *J233* Aruna Patil     */
/* REVISION: 9.1    LAST MODIFIED: 10/01/99        BY: *N014* Patti Gaultney  */
/* REVISION: 9.1    LAST MODIFIED: 09/04/99        BY: *K22J* Ranjit Jain     */
/* REVISION: 9.1    LAST MODIFIED: 11/09/99        BY: *N004* Dan Herman      */
/* REVISION: 9.1    LAST MODIFIED: 08/12/00        BY: *N0KP* myb             */
/* Old ECO marker removed, but no ECO header exists *F0PN*                    */
/* Revision: 1.16     BY: Dan Herman         DATE: 07/09/01  ECO: *P007*      */
/* Revision: 1.17     BY: Rajiv Ramaiah      DATE: 07/20/01  ECO: *M1FM*      */
/* Revision: 1.18     BY: Steve Nugent       DATE: 10/15/01  ECO: *P004*      */
/* Revision: 1.19     BY: Patrick Rowan      DATE: 04/24/01  ECO: *P00G*      */
/* $Revision: 1.20 $    BY: Katie Hilbert      DATE: 04/15/02  ECO: *P03J*      */

/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/
/*V8:ConvertMode=Report                                              */
/******************************************************************************/


/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

FUNCTION code_desc returns character (input trlcode as character):
   define variable code_desc as character no-undo.
   for first trl_mstr fields(trl_code trl_desc) where
         trl_code = trlcode
         no-lock:
      code_desc = trl_desc.
   end.
   return code_desc.
END FUNCTION.

/* VARIABLE DEFINITIONS FOR gpfile.i */
{gpfilev.i}

/* SCHEDULED ORDER INQUIRY INCLUDE */

program:
do:
   display
      scx_shipfrom
      scx_order
      scx_line
      scx_shipto
      ad_name          when (available ad_mstr)
      scx_part
      l_desc1          @ sod_desc
      pt_um            when (available pt_mstr)
      scx_po
      scx_custref
      sod_custpart     when (available sod_det)
      scx_modelyr
   with frame prm STREAM-IO /*GUI*/ .

   
/*GUI*/ {mfguichk.i  &warn=false &label=program} /*Replace mfrpchk*/


   assign
      so_wk_offset    = integer(substring(so_conrep,1,1))
      so_translt_days = decimal(substring(so_conrep,2,6))
      so_translt_hrs  = decimal(substring(so_conrep,8,6))
      so_cumulative   = substring(so_conrep,14,1) = "y"
      socmmts         = (so_cmtindx <> 0 or (new so_mstr and soc_hcmmts))
      print_ih        = (substring(so_inv_mthd,1,1) = "b" or
                         substring(so_inv_mthd,1,1) = "p" or
                         substring(so_inv_mthd,1,1) = "")
      edi_ih          = (substring(so_inv_mthd,1,1) = "b" or
                         substring(so_inv_mthd,1,1) = "e").

   impexp = no.
   if can-find( first ie_mstr
      where ie_type = "1" and ie_nbr = so_nbr ) then impexp = yes.
   display
      so_ar_acct
      so_ar_sub
      so_ar_cc
      so_taxable
      so_taxc
      so_wk_offset
      so_cumulative
      so_consignment when (using_cust_consignment)
      so_bill
      impexp
      so_shipvia
      so_fob
      so_translt_days
      socmmts
      print_ih
      edi_ih
      so_print_pl
      (substring(so_inv_mthd,2,1)) = "y" @ so_auto_inv
      so_site
      so_channel
      so_bump_all
      so_cum_acct
      so_curr
      so_userid
      so_seq_order
      so_rmks
      so_custref_val
   with frame so1 STREAM-IO /*GUI*/ .

   /* DETERMINE IF CUSTOMER CONSIGNMENT POP-UP IS TO DISPLAY */
   if using_cust_consignment and so_consignment then do:
      proc_id = "popup-inquiry".
      {gprunmo.i
         &program = ""socnso.p""
         &module = "ACN"
         &param =
            """(input proc_id,
                input so_nbr,
                input so_ship,
                input so_site,
                input yes)"""}
   end.  /* if using_cust_consignment and so_consignment */

   /* DISPLAY NON-CUMULATIVE DATA */
   if not so_cum_acct then do:
      display
         so_auth_days
         so_ship_cmplt
         so_merge_rss
         so__qadl02
               skip(.1)   
      with frame so2 STREAM-IO /*GUI*/ .
      if not batchrun and dev = "terminal" then pause.
   end.

   if so_seq_order then do:
      hide frame so2 no-pause.
      clear frame so3 all.
      display
         so_inc_in_rss
         so_firm_seq_days
      with frame so3 STREAM-IO /*GUI*/ .
      if not batchrun and dev = "terminal" then pause.
   end.

   
/*GUI*/ {mfguichk.i  &warn=false &label=program} /*Replace mfrpchk*/


   /* HEADER COMMENTS */
   {gprun.i ""rcsocmmt.p"" "(input socmmts,
                             input so_cmtindx)"
      }

   hide frame so1.
   hide frame so3.
   hide frame sod2.
   hide frame alt-clc2.

   assign
      sod_psd_pat  = substring(sod_sch_data,1,2)
      sod_psd_time = substring(sod_sch_data,3,2)
      sod_ssd_pat  = substring(sod_sch_data,5,2)
      sod_ssd_time = substring(sod_sch_data,7,2)
      sodcmmts     = (sod_cmtindx <> 0 or (new sod_det and soc_lcmmts)).

   display
      sod_pr_list
      sod_list_pr
      sod_price
      sod_acct
      sod_sub
      sod_cc
      sod_dsc_acct
      sod_dsc_sub
      sod_dsc_cc
      sod_taxable
      sod_taxc
      sod_consume
      sod_type
      sod_loc
      sod_order_category
      sod_consignment
   with frame sod1 STREAM-IO /*GUI*/ .

   /* DETERMINE IF CUSTOMER CONSIGNMENT POP-UP IS TO DISPLAY */
   if using_cust_consignment and sod_consignment then do:
      proc_id = "popup-inquiry".
      {gprunmo.i
         &program=""socnsod.p""
         &module="ACN"
         &param="""(input proc_id,
           input sod_nbr,
           input sod_line,
           input sod_part,
           input sod_ship,
           input sod_site,
           input yes)"""}
   end.

   
/*GUI*/ {mfguichk.i  &warn=false &label=program} /*Replace mfrpchk*/

         hide frame sod1.   
   display
      sod_rbkt_days
      sod_dock
      sod_psd_pat
      sod_rbkt_weeks
      sod_start_eff[1]
      sod_psd_time
      sod_rbkt_mths
      sod_end_eff[1]
      sod_ssd_pat
      sod_fab_days
      sod_cum_qty[3]
      sod_ssd_time
      sod_raw_days
      sod_ord_mult
      sod_conrep
      sod_custpart
      sod_cum_date[1]
      sod_pkg_code
      sod_alt_pkg
      sodcmmts
      sod_charge_type
   with frame sod2 STREAM-IO /*GUI*/ .

   
/*GUI*/ {mfguichk.i  &warn=false &label=program} /*Replace mfrpchk*/

         hide frame sod2.   
   /* LINE COMMENTS */
   {gprun.i ""rcsocmmt.p"" "(input sodcmmts,
                             input sod_cmtindx)"}

   /* DETERMINE IF CONTAINER AND LINE CHARGES ARE ENABLED */
   {cclc.i}

   if using_container_charges and sod_alt_pkg then do:
      i = 1.
      clear frame alt-clc2 all.
      for each act_mstr
         fields(act_cont_part act_ord_mult act_charge_type)
         where act_nbr = sod_nbr and
               act_line = sod_line no-lock:
         line_no = string(i, "99") + ".".
         display
            line_no
            act_cont_part
            act_ord_mult
            act_charge_type
         with frame alt-clc2 STREAM-IO /*GUI*/ .
         down 1 with frame alt-clc2.

         i = i + 1.

      end. /* FOR EACH ACT_MSTR */
      hide frame alt-clc2.
   end. /* If USING_CONTAINER */

   if using_line_charges then do:
      clear frame linecharge all.
      for each sodlc_det
         fields(sodlc_order sodlc_ord_line sodlc_lc_line sodlc_trl_code
                sodlc_lc_amt sodlc_one_time sodlc_charge_type sodlc_ref)
         no-lock where
            sodlc_order = sod_nbr and
            sodlc_ord_line = sod_line:
         addcharge = code_desc(sodlc_trl_code).
         display
            sodlc_lc_line
            addcharge
            sodlc_trl_code
            sodlc_lc_amt
            sodlc_one_time
            sodlc_charge_type
            sodlc_ref
         with frame linecharge down STREAM-IO /*GUI*/ .
         down 1 with frame linecharge.
      end. /*FOR EACH SODLC_DET*/
      hide frame linecharge.
   end. /*IF USING_LINE_CHRGS*/
   if not batchrun and dev = "terminal" then pause.

   page.
end.
